using AutoMapper;
using Volo.Abp.AutoMapper;
using Matrix.ServiceDiscovery.Services;

namespace Matrix.ServiceDiscovery
{
    /// <summary>
    /// ServiceDiscovery模块AutoMapper配置 - 使用ABP vNext标准方式
    /// </summary>
    public class MatrixServiceDiscoveryApplicationAutoMapperProfile : Profile
    {
        public MatrixServiceDiscoveryApplicationAutoMapperProfile()
        {
            // 基本实体到DTO映射 - 使用ABP标准方式
            CreateMap<ServiceInstance, ServiceInstanceDto>();
            CreateMap<ServiceRegistration, ServiceRegistrationDto>();
            CreateMap<HealthCheckRecord, HealthCheckRecordDto>();

            // DTO到实体映射
            CreateMap<ServiceInstanceDto, ServiceInstance>();
            CreateMap<ServiceRegistrationDto, ServiceRegistration>();
            CreateMap<HealthCheckRecordDto, HealthCheckRecord>();
        }
    }
}